﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Reward.master" AutoEventWireup="true" CodeFile="Detail.aspx.cs" Inherits="SY.WebSite.Web.Reward.Detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title><%= CurrentReward.Title%> - 悬赏系统 - <%= Settings.Title %></title>
    <link href="<%= Settings.StaticFileDomain %>/Scripts/util/jquery-pagination/lib/jquery_pagination/pagination.css" rel="stylesheet" type="text/css" />    
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/template/trimpath-template.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/jquery-pagination/lib/jquery_pagination/jquery.pagination.js" type="text/javascript"></script>
    <% if (CurrentReward.EndTime > DateTime.Now) { %>
	<link rel="stylesheet" href="<%= Settings.StaticFileDomain %>/Scripts/util/kindeditor/themes/default/default.css" />
	<script charset="utf-8" src="<%= Settings.StaticFileDomain %>/Scripts/util/kindeditor/kindeditor.js" type="text/javascript"></script>
	<script charset="utf-8" src="<%= Settings.StaticFileDomain %>/Scripts/util/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
    <% } %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="Server">
    <div class="row">
        <div class="twelve columns">
            <div class="panel">
                <div class="row">
                    <div class="nine columns">
                        <label class="title"><h4><%= CurrentReward.Title %></h4></label>
                    </div>
                    <div class="three columns" style="text-align:right">
                        <label class="inline" style="margin-bottom:3px">悬赏素币：<%= CurrentReward.Amount %></label>
                    </div>
                </div>
                <div style="word-wrap: break-word;">
                    <p><%= CurrentReward.Description %></p>
                </div>
                <div>
                    发起人：<%= CurrentReward.UserName %>&nbsp;&nbsp;截止时间：<%= CurrentReward.EndTime.ToString("yyyy-MM-dd HH:mm") %>
                </div>
            </div>
        </div>
    </div>
    <dl class="tabs">
        <% if (CurrentReward.EndTime > DateTime.Now) { %>
        <dd class=""><a href="javascript:void(0);">提交创意</a></dd>
        <% } %>
        <dd class=""><a href="javascript:void(0);">全部创意(<strong><span id="responseCount"><%= CurrentReward.ResponseCount %></span></strong>)</a></dd>
        <dd class=""><a href="javascript:void(0);">我的创意</a></dd>
    </dl>
    <% if (CurrentReward.EndTime > DateTime.Now) { %>
    <div id="tab0" class="row" style="padding-bottom: 15px;">
        <div class="twelve columns">
            <textarea id="description" rows="15"></textarea><br />
            <input type="button" id="btnSubmit" class="button" value="提交创意"/>
        </div>
    </div>
    <% } %>
    <div id="tab1" style="display:none">
        <div id="result"></div>
        <div id="pagination"></div>
    </div>

    <textarea name="transaction" id="transaction" style="display:none;">        
        {for l in list}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        <div class="row">
                            <div class="eight columns">
                                <label class="title"><strong>@{l.Title}</strong></label>
                                <label>@{l.Amount}</label>
                            </div>
                            <div class="four columns">
                                <label>截止时间：@{l.EndTime.ToDate().Format("yyyy-MM-dd hh:mm")}</label>
                            </div>
                        </div>
                        <div style="word-wrap: break-word;">
                            <p>@{l.Summary}</p>
                        </div>
                        <div>
                            发起人：@{l.UserName}
                        </div>
                    </div>
                </div>
            </div>
        {forelse}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        暂无相关悬赏
                    </div>
                </div>
            </div>
        {/for}
    </textarea>

    <textarea name="responselist" id="responselist" style="display:none;">        
        {for l in list}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        <div class="row">
                            <div class="two columns">
                                <label><strong>@{l.UserName}</strong></label>
                            </div>
                            <div class="ten columns">
                                <p>@{l.Content.replace(/<\/*script[^>]*>/g, '')}</p>
                                <label>提交时间：@{l.CreateTime.ToDate().Format("yyyy-MM-dd hh:mm")}</label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {forelse}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        暂无相关创意
                    </div>
                </div>
            </div>
        {/for}
    </textarea>
    
    <script src="<%= Settings.StaticFileDomain %>/Scripts/page/reward/detail.js" type="text/javascript"></script>
    <script type="text/javascript">
        page.id = <%= CurrentReward.Id %>;
    </script>
</asp:Content>